package flp.problem;

/**
 * Klasa reprezentuje ograniczenia na konkretny BuildingSite.
 * 
 * @author qadro_
 */
public class InvidualBuildingSiteConstraints
{
    /**
     * Czy stanowisko moze być myjnia.
     */
    protected boolean letClean;

    /**
     * Dla ktorych RiverFacility stanowisko moze byc inboundem?
     */
    protected boolean letInboundFor[];
    /**
     * Dla ktorych RiverFacility stanowisko moze byc outboundem?
     */
    protected boolean letOutboundFor[];
    
    @Override
    public String toString()
    {
        String rep = String.format("\tletClean: %s\n\t", letClean);
        String tmp = "\n\t";
        for (int i = 0; i < letInboundFor.length; ++i)
        {
            rep += String.format(" %s", letInboundFor[i]);
            tmp += String.format(" %s", letOutboundFor[i]);
        }
        return rep + tmp + "\n";
    }
	
    public InvidualBuildingSiteConstraints(boolean letClean, boolean[] letInboundFor, boolean[] letOutboundFor) {
        this.letClean = letClean;
        this.letInboundFor = letInboundFor;
        this.letOutboundFor = letOutboundFor;
    }
    
    public boolean isLetClean()
    {
   	return letClean;
    }
	
    public void setLetClean(boolean letClean)
    {
	this.letClean = letClean;
    }
	
    public boolean isLetInboundFor(int riverFacilityID)
    {
	return letInboundFor[riverFacilityID];
    }
	
    public boolean isLetOutboundFor(int riverFacilityID)
    {
	return letOutboundFor[riverFacilityID];
    }

}
